package com.sunny.fetch.pojo;

import javax.persistence.*;

@Table(name = "f_top_inst")
public class FTopInst {
    @Id
    private Long tid;

    /**
     * 交易日期
     */
    @Column(name = "trade_date")
    private String tradeDate;

    /**
     * TS代码
     */
    @Column(name = "ts_code")
    private String tsCode;

    /**
     * 营业部名称
     */
    private String exalter;

    /**
     * 买入额（万）
     */
    private Float buy;

    /**
     * 买入占总成交比例
     */
    @Column(name = "buy_rate")
    private Float buyRate;

    /**
     * 卖出额（万）
     */
    private Float sell;

    /**
     * 卖出占总成交比例
     */
    @Column(name = "sell_rate")
    private Float sellRate;

    /**
     * 净成交额（万）
     */
    @Column(name = "net_buy")
    private Float netBuy;

    public FTopInst(Long tid, String tradeDate, String tsCode, String exalter, Float buy, Float buyRate, Float sell, Float sellRate, Float netBuy) {
        this.tid = tid;
        this.tradeDate = tradeDate;
        this.tsCode = tsCode;
        this.exalter = exalter;
        this.buy = buy;
        this.buyRate = buyRate;
        this.sell = sell;
        this.sellRate = sellRate;
        this.netBuy = netBuy;
    }

    public FTopInst() {
        super();
    }

    /**
     * @return tid
     */
    public Long getTid() {
        return tid;
    }

    /**
     * @param tid
     */
    public void setTid(Long tid) {
        this.tid = tid;
    }

    /**
     * 获取交易日期
     *
     * @return trade_date - 交易日期
     */
    public String getTradeDate() {
        return tradeDate;
    }

    /**
     * 设置交易日期
     *
     * @param tradeDate 交易日期
     */
    public void setTradeDate(String tradeDate) {
        this.tradeDate = tradeDate;
    }

    /**
     * 获取TS代码
     *
     * @return ts_code - TS代码
     */
    public String getTsCode() {
        return tsCode;
    }

    /**
     * 设置TS代码
     *
     * @param tsCode TS代码
     */
    public void setTsCode(String tsCode) {
        this.tsCode = tsCode;
    }

    /**
     * 获取营业部名称
     *
     * @return exalter - 营业部名称
     */
    public String getExalter() {
        return exalter;
    }

    /**
     * 设置营业部名称
     *
     * @param exalter 营业部名称
     */
    public void setExalter(String exalter) {
        this.exalter = exalter;
    }

    /**
     * 获取买入额（万）
     *
     * @return buy - 买入额（万）
     */
    public Float getBuy() {
        return buy;
    }

    /**
     * 设置买入额（万）
     *
     * @param buy 买入额（万）
     */
    public void setBuy(Float buy) {
        this.buy = buy;
    }

    /**
     * 获取买入占总成交比例
     *
     * @return buy_rate - 买入占总成交比例
     */
    public Float getBuyRate() {
        return buyRate;
    }

    /**
     * 设置买入占总成交比例
     *
     * @param buyRate 买入占总成交比例
     */
    public void setBuyRate(Float buyRate) {
        this.buyRate = buyRate;
    }

    /**
     * 获取卖出额（万）
     *
     * @return sell - 卖出额（万）
     */
    public Float getSell() {
        return sell;
    }

    /**
     * 设置卖出额（万）
     *
     * @param sell 卖出额（万）
     */
    public void setSell(Float sell) {
        this.sell = sell;
    }

    /**
     * 获取卖出占总成交比例
     *
     * @return sell_rate - 卖出占总成交比例
     */
    public Float getSellRate() {
        return sellRate;
    }

    /**
     * 设置卖出占总成交比例
     *
     * @param sellRate 卖出占总成交比例
     */
    public void setSellRate(Float sellRate) {
        this.sellRate = sellRate;
    }

    /**
     * 获取净成交额（万）
     *
     * @return net_buy - 净成交额（万）
     */
    public Float getNetBuy() {
        return netBuy;
    }

    /**
     * 设置净成交额（万）
     *
     * @param netBuy 净成交额（万）
     */
    public void setNetBuy(Float netBuy) {
        this.netBuy = netBuy;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", tid=").append(tid);
        sb.append(", tradeDate=").append(tradeDate);
        sb.append(", tsCode=").append(tsCode);
        sb.append(", exalter=").append(exalter);
        sb.append(", buy=").append(buy);
        sb.append(", buyRate=").append(buyRate);
        sb.append(", sell=").append(sell);
        sb.append(", sellRate=").append(sellRate);
        sb.append(", netBuy=").append(netBuy);
        sb.append("]");
        return sb.toString();
    }
}